package com.qingke.ssh.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;

import org.springframework.stereotype.Component;
@Component
@Entity
@Table(name = "employee_login")
public class EmployeeLogin {
	@Id
	@Column(name = "id")
	private int id;
	@Column(name = "code")
	private String code;
	@Column(name = "password")
	private String password;

	@OneToOne
	@JoinColumn(name="employee_id")
	private Employee employee;
	
	public EmployeeLogin(String code, String password) {
		super();
		this.code = code;
		this.password = password;
	}

	public EmployeeLogin() {
		super();
	}

	public int getId() {
		return id;
	}

	public String getCode() {
		return code;
	}

	public String getPassword() {
		return password;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}
	
	
}
